package com.springboot.service.impl;

import com.springboot.mapper.MedicineListFormMapper;
import com.springboot.model.MedicineListForm;
import com.springboot.service.AssistantSeeMedicineListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class AssistantSeeMedicineListServiceImpl implements AssistantSeeMedicineListService {

    @Autowired
    private MedicineListFormMapper medicineListFormMapper;

    @Override
    public ArrayList<MedicineListForm> getAssistantSeeMedicineList(Integer patientId) {
        ArrayList<MedicineListForm> medicineListForms=new ArrayList<>();
        try {
            medicineListForms=medicineListFormMapper.selectByPatientId(patientId);
        } catch (Exception e) {
            System.out.println("medicineListFormMapper查找失败");
            e.printStackTrace();
        }
        return medicineListForms;
    }
}


